package com.tsunami.authority.entity.auth;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.tsunami.base.entity.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * <p>
 * 角色表
 * </p>
 *
 * @author lx
 * @since 2021-09-23
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@TableName("tnm_auth_role")
@ApiModel(value="Role", description="角色")
public class Role extends Entity<Long> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "租户号")
    @TableField(value = "tenant_id")
    private Long tenantId;

    @ApiModelProperty(value = "角色名称")
    @TableField(value = "name")
    private String name;

    @ApiModelProperty(value = "角色编码")
    @TableField(value = "code")
    private String code;

    @ApiModelProperty(value = "角色描述")
    @TableField(value = "describe_")
    private String describe;

    @ApiModelProperty(value = "是否启用状态")
    @TableField(value = "status")
    private Boolean status;

    @ApiModelProperty(value = "是否内置角色")
    @TableField(value = "readonly")
    private Boolean readonly;

    @ApiModelProperty(value = "数据范围")
    @TableField(value = "scope")
    private String scope;

}
